import type { RouteRecordRaw } from 'vue-router';

import Layout from '@/layouts/index.vue';

export const fileRoutes: RouteRecordRaw[] = [
  {
    path: '/file',
    name: 'FileRoot',
    component: Layout,
    redirect: '/file/pdf-preview',
    meta: {
      title: '文件预览',
      icon: 'FileList',
      authCodes: [],
      visible: true,
    },
    children: [
      {
        path: '/file/pdf-preview',
        name: 'PdfPreview',
        component: () => import(/* webpackChunkName: "pdfPreview" */ '@/views/file/pdf-preview/index.vue'),
        meta: {
          authCodes: [],
          title: 'PDF预览',
        },
      },
      {
        path: '/file/cad-preview',
        name: 'CadPreview',
        component: () => import(/* webpackChunkName: "cadPreview" */ '@/views/file/cad-preview/index.vue'),
        meta: {
          authCodes: [],
          title: 'CAD预览',
        },
      }
    ],
  }
];
